<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<title>Document</title>
	<style>
		* {
			margin: 0;
			padding: 0;
		}

		.box {
			position: relative;
			width: 400px;
			height: 400px;
			background-color: red;

			.run {
				position: absolute;
				top: 0px;
				left: 0px;
				width: 100px;
				height: 100px;
				background-color: cyan;
				transition: all 1s linear;
			}

			.ani {
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%) scale(2);
			}
		}
	</style>
</head>

<body>
	<button>移动</button>
	<div class="box">
		<div class="run"></div>
	</div>
	<form>
		<input type="text" name="" id="">
		<button type="submit">提交</button>
	</form>

</body>
<script>
	const arr = [{
		a: 1
	}, {
		a: 3
	}, {
		a: 7
	}, {
		a: 12
	}]

	function getLevel(x) {
		return arr.findIndex(item => x < item)
	}
	const level = getLevel(1)
	console.log(level, 'getLevel');
	// const bt  = document.querySelector('button');
	// const run = document.querySelector('.run')
	// bt.addEventListener('click',()=> {
	// 	run.classList.add('ani')
	// })
	// const arr = [1,2,3,4]
	// arr.splice(1,0,99) 
	// console.log(arr,'arrarr');
	var chineseAndSymbolsRegex = /[\u4e00-\u9fa5\u3000-\u303f\uff00-\uffef]/g;

	var inputString = "Hello 你好，World！你好！＠＃＄％＾＆＊（）——＋｜｛｝：“《》？";

	// 过滤中文字符和中文符号
	var filteredString = inputString.replace(chineseAndSymbolsRegex, '');
	console.log(filteredString);
</script>
<script>
</script>

</html>      